<template>
  <div>
    <div class="hd1" style="height: 42px; font-size: 24px">我的歌手({{this.myartistcount}})</div>
    <ul style="width: 100%; margin: 10px 10px 0 20px">
      <li
        style="
          width: 660px;
          height: 90px;
          border-bottom: 1px solid rgb(221, 221, 221);
          margin-top: 8px;
        "
        v-for="items in myartist"
        @click="toArtist(items.id)"
       
      >
        <div style="float: left">
          <a href="#">
            <img   :src="items.picUrl" alt="" style="width: 80px; height: 80px" />
          </a>
        </div>
        <div style="float: left; margin-left: 10px">
          <h4>{{ items.name }}</h4>
          <p>
            {{ items.albumSize }}个专辑&nbsp;&nbsp;&nbsp;{{ items.mvSize }}个MV
          </p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
import axios from "axios";
export default {
  name: "mymusicartist",
  data() {
    return {
      myartist: [],
      myartistcount:''
    };
  },
  created() {
    axios({
      url: "http://localhost:3000/artist/sublist",
      method: "get",
      params: {
        cookie: window.sessionStorage.cookie,
      },
    }).then((res) => {
      console.log(res);
      this.myartist = res.data.data;
      this.myartistcount=res.data.count
    });
  },
};
</script>